/*
 * @Description:
 * @Version: 2.0
 * @Autor: snzo.chen
 * @Date: 2023-11-20 14:44:47
 * @LastEditors: snzo.chen
 * @LastEditTime: 2023-12-21 08:31:46
 */
import { RouteRecordRaw } from 'vue-router';

const moduleName = 'user';
const routes: Array<RouteRecordRaw> = [
  {
    path: '/user',
    meta: {
      title: '用户管理',
    },
    children: [
      {
        path: 'person',
        name: `${moduleName}-person`,
        component: () => import('@/views/user/index.vue'),
        meta: { title: '游客', keepAlive: true },
        children: [
          {
            path: 'list',
            name: `${moduleName}-person-list`,
            component: () => import('@/views/user/person/person.vue'),
            meta: { title: '游客', keepAlive: true },
          },
          {
            path: 'contacts/:thirdUniqueAccount',
            name: `${moduleName}-person-contacts`,
            component: () => import('@/views/user/person/contacts.vue'),
            meta: { title: '常用联系人', keepAlive: true },
          },
        ],
      },
      {
        path: 'checker',
        name: `${moduleName}-checker`,
        component: () => import('@/views/user/checker/checker.vue'),
        meta: { title: '核销员列表', keepAlive: true },
      },
    ],
  },
];

export default routes;
